local transform;

MatchPanel = {};
local this = MatchPanel;

--启动事件--
function MatchPanel.Awake(obj)
	transform = obj.transform;
	this.ImgTable = {};
	this.InitPanel();
	logWarn("Awake lua--->>"..transform.name);
end
local switch = {
	[0] = function()
		this.TowRoomTypeGrid.gameObject:SetActive(true);
		this.FourRoomTypeGrid.gameObject:SetActive(false);
		this.SetImgTable(this.TowRoomTypeGrid,2);
	end,
	[1] = function()
		this.TowRoomTypeGrid.gameObject:SetActive(false);
		this.FourRoomTypeGrid.gameObject:SetActive(true);
		this.SetImgTable(this.FourRoomTypeGrid,4);
	end,
}
--初始化面板--
function MatchPanel.InitPanel()
	this.ReadyBtn = transform:Find("ReadyBtn").gameObject;
	this.TowRoomTypeGrid = transform:Find("TowRoomTypeGrid");
	this.FourRoomTypeGrid = transform:Find("FourRoomTypeGrid");
	switch[NetData:GetRoomType():ToInt()]();

end



function MatchPanel.SetImgTable(mTran,count)
	for i = 1,count do
		this.ImgTable[i] = mTran:Find(tostring(i)):GetComponent('Image');
	end
end

--单击事件--
function MatchPanel.OnDestroy()
	logWarn("OnDestroy---->>>");
end

